package com.sky.seata.account.client.impl;

import com.sky.seata.account.client.IAccountClient;
import com.sky.seata.account.service.IAccountService;
import com.sky.seata.storage.client.IStockClient;
import org.apache.dubbo.config.annotation.Reference;
import org.apache.dubbo.config.annotation.Service;

import javax.annotation.Resource;

@Service
public class AccountClientImpl implements IAccountClient {

    @Resource
    private IAccountService accountService;
    @Reference(check = false, retries = -1)
    private IStockClient stockClient;

    @Override
    public void update() {
        accountService.update();
    }

    @Override
    public void update2() {
        accountService.update();
        stockClient.updateStock();
        int i = 1 / 0;
    }
}
